package kse;

import java.util.Scanner;

public class J02MyAge {
	// 변수 선언
	// 생년입력,나이계산
	// 결과출력
	public static void main(String[] args) {

		int birthYear;
		int currentYear;
		int age;
		Scanner sc = null;

		
		sc = new Scanner(System.in);
		System.out.println("생년을 입력하세요");
		birthYear = sc.nextInt();
		System.out.println("현재년도를 입력하세요");
		currentYear = sc.nextInt();
		age = currentYear - birthYear + 1;

		
		System.out.println(age);

	}

}
